//
//  FirstViewController.m
//  tabbar
//
//  Created by student on 16/2/22.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "FirstViewController.h"
extern int calcount;

@interface FirstViewController ()
@property (weak, nonatomic) IBOutlet UITextField *width;
@property (weak, nonatomic) IBOutlet UITextField *length;
@property (weak, nonatomic) IBOutlet UITextView *area;

- (IBAction)cal:(UIButton *)sender;

@end

@implementation FirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (IBAction)cal:(UIButton *)sender
{
    self.area.text = [NSString stringWithFormat:@"%d",[self.width.text intValue]*[self.length.text intValue]];
    calcount++;
}

- (IBAction)baktap:(id)sender
{
    [self.view endEditing:YES];
}

@end
